package cn.dliyy.base.bean;

import java.io.Serializable;

public class KeyValuePK implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 2296461368393809064L;
	private String code;
	private String codeType;

	public KeyValuePK() {
	}

	public KeyValuePK(String codeType, String code) {
		this.codeType = codeType;
		this.code = code;
	}

	public String getcode() {
		return code;
	}

	public void setcode(String code) {
		this.code = code;
	}

	public String getcodeType() {
		return codeType;
	}

	public void setcodeType(String codeType) {
		this.codeType = codeType;
	}

	@Override
	public int hashCode() {
		final int PRIME = 31;
		int result = 1;
		result = PRIME * result + ((code == null) ? 0 : code.hashCode());
		result = PRIME * result + ((codeType == null) ? 0 : codeType.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final KeyValuePK other = (KeyValuePK) obj;
		if (code == null) {
			if (other.code != null)
				return false;
		} else if (!code.equals(other.code))
			return false;
		if (codeType == null) {
			if (other.codeType != null)
				return false;
		} else if (!codeType.equals(other.codeType))
			return false;
		return true;
	}

}
